A prior art data processing device is a 8051 compatible microcontroller known from the Dallas semiconductors DS87C550, as described in a product preview data sheet dated Sep. 16, 1998.
The original 8051 was a very simple machine, with a limited instruction set. The DS87C550 provides an extension of the original 8051, while maintaining compatibility with the original 8051 (i.e. the DS87C550 executes 8051 programs with the same effect as the 8051). The extension concerns the data pointer register of the original 8051. The original 8051 had a single data pointer register DPTR. The DPTR register is used in MOVE instructions to move data between register and memory locations. The DPTR contains an address that the processor uses to address memory used in the MOVE instructions. Data from a succession of addresses can be moved to register and processed by executing successive MOVE instructions, each followed by incrementation of the address in the DPTR register.
The 8051 had a DPTR increment instruction INC for incrementing the DPTR. But the 8051 did not have the possibility to decrement the DPTR. The DS87C550 improves this. The DS87C550 introduces an instruction-settable control bit which controls whether the processor responds to the 8051 DPTR increment instruction by incrementing the DPTR or by decrementing the DPTR.
The original 8051 only had a single DPTR register. If the original 8051 had to transfer data from a first series of memory locations to a second series of memory locations with MOVE instructions, the address in the DPTR register had to be replaced alternately with an address for addressing the first series and an address for addressing the second series. This caused considerable instruction overhead. The Dallas DS87C550 reduces this overhead. Two registers are provided instead of the single DPTR, one register for addressing memory in moves to memory and one for move from memory. In a toggle mode, the DS87C550 uses alternately one register and the other, e.g. in MOVE or INC instructions.
A program for transferring data using the Dallas 8051 can move data from one memory region to another by executing the following instruction sequence repeatedly:
MOV A,@DPTR loads A from memory address pointed at by firstDPTRMOV @DPTR,A1stores A to memory address pointed at by secondDPTRINC DPTRincrements or decrements first DPTRINC DPTRincrements or decrements second DPTR
Each of these instructions has the side effect that the next instruction will use a different one of the registers. Thus, the overhead needed to reload addresses into the DPTR register is avoided. However, the instruction sequence that must be repeated still contains four instructions.